import { ADD, MINUS } from '@/action-types';
import { LocationDescriptorObject} from 'history'
import { TodosLocationState } from '@/components/Todos'
import { push, CallHistoryMethodAction } from 'connected-react-router';


export function add() {
    return { type: ADD };
}
export function minus() {
    return { type: MINUS };
}
export function go(path: LocationDescriptorObject<TodosLocationState>): CallHistoryMethodAction{
    return push(path)
}
export type CounterAction = ReturnType<typeof add> | ReturnType<typeof minus>